﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example_aliasing_and_Arrays
{
    class School
    {
        private String name;
        private int[] myNumbers;

        public School(String name, int capacity)
        {
            this.name = name;
            this.myNumbers = new int[capacity];
        }
       //property's
        public String Name { get { return this.name; } }
        public int NrOfElements { get { return this.myNumbers.Length; } }
        
        //methods
        public void fillArrayCompletelyWithRandomNumbers()
        {
            Random flupke;
            flupke = new Random();
            for (int i = 0; i < this.myNumbers.Length; i++)
            {
                this.myNumbers[i] = flupke.Next(0, 15);
            }
        }

        public int getNumber(int index)
        {
            return this.myNumbers[index];
        }

        public int countFrequencyOfACertainMark(int whatMark)
        {
            //todo
            return 55; //to satisfy the compiler
        }
        public int[] getAllFrequencies()
        {
            //todo
            return null; //to satisfy the compiler
        }
    }
}
